Skip to content

Conversation

@geertjanvdk
Copy link

Previously, it was not possible to create custom connections without
monkey patching graphene.relay.Connection. Custom connections are
useful when all connections need a total count for paging, for example.

We change the SQLAlchemyObjectType.__init_subclass_with_meta method
so that when the connection argument is a class, it is used to create
the new connection type.

A test case has been added to check usage of custom connections. The
conftest.py was added to allow pytest using database related fixtures
in other places than test_query.py.

Previously, it was not possible to create custom connections without
monkey patching graphene.relay.connection. Custom connections are
useful when all connections need a total count for paging, for example.

We change the SQLAlchemyObjectType.__init_subclass_with_meta method
so that when the connection argument is a class, it is used to create
the new connection type.

A test case has been added to check usage of custom connections. The
`conftest.py` was added to allow pytest using database related fixtures
in other places than `test_query.py`.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 90.411% when pulling 7914c86 on geertjanvdk:fix/65 into 136d2b3 on graphql-python:master.

@coveralls
Copy link

coveralls commented Nov 21, 2017

Coverage Status

Coverage decreased (-0.4%) to 90.411% when pulling a5579d8 on geertjanvdk:fix/65 into 136d2b3 on graphql-python:master.

@coveralls
Copy link

coveralls commented Nov 21, 2017

Coverage Status

Coverage decreased (-0.03%) to 90.785% when pulling 0977013 on geertjanvdk:fix/65 into 136d2b3 on graphql-python:master.

@coveralls
Copy link

coveralls commented Nov 21, 2017

Coverage Status

Coverage increased (+0.2%) to 91.034% when pulling 43ed2ed on geertjanvdk:fix/65 into 136d2b3 on graphql-python:master.

@geertjanvdk
Copy link
Author

I'm closing this request and reopen with rebased branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants